home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / FGL304E.ZIP;1 / EXPAS.ARJ / FGDOC / EXAMPLES / PASCAL / 12-01.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1994-01-24  |  799 b   |  42 lines

  1. program main;
  2. uses fgmain, fgmisc;
  3.  
  4. var
  5.   new_mode : integer;
  6.   old_mode : integer;
  7.   x        : integer;
  8.  
  9. begin
  10.  
  11.   { initialize the video environment }
  12.  
  13.   new_mode := fg_bestmode(320,200,1);
  14.   if (new_mode < 0 ) or ( new_mode = 12) then
  15.   begin
  16.     write('This program requires a 320 ');
  17.     writeln('x 200 color graphics mode.');
  18.     exit;
  19.   end;
  20.   old_mode := fg_getmode;
  21.   fg_setmode(new_mode);
  22.  
  23.   { move the object across the screen }
  24.  
  25.   for x := -20 to 319 do
  26.   begin
  27.     if (x mod 5 = 0) then
  28.     begin
  29.       fg_setcolor(10);
  30.       fg_clprect(x,x+19,95,104);
  31.       fg_waitfor(1);
  32.       fg_setcolor(0);
  33.       fg_clprect(x,x+19,95,104);
  34.     end;
  35.   end;
  36.  
  37.   { restore the original video mode and return to DOS }
  38.  
  39.   fg_setmode(old_mode);
  40.   fg_reset;
  41. end.
  42.